<?php
namespace BLL\DataModel;
/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
/**
 * Description of DataType
 *
 * @author David Wu
 */
Class DataSourceType {
    
    const FormInput = "FormInput";
    const JSon = "JSon";
    const Calculate = "Calculate";
    const Fix = "Fix";

    public static function createByName($string){
        if ($string === "FormInput") {
            return DataSourceType::FormInput;
        }
        if ($string === "JSone") {
            return DataSourceType::JSone;
        }
        if ($string === "Calculate") {
            return DataSourceType::Calculate;
        }
        if ($string === "Fix") {
            return DataSourceType::Fix;
        }
        return DataSourceType::FormInput;
    }
}